<template>
<!-- *进度 -->
  <div class="progress">
    <ul class="book-progress">
      <li class="l1">
        <a href="javascript:;">
          <img :src="this.notYet[0].imgSrc" alt="" />
          <p>{{ this.notYet[0].complete }}</p>
          <p class="last"><span>{{this.notYet.length}}</span>本</p>
        </a>
      </li>
      <li class="l2">
        <a href="javascript:;">
          <img :src="this.ls[0].imgSrc" alt="">
          <p>{{this.ls[0].complete}}</p>
          <p class="last"><span>{{this.ls.length}}</span>本</p>
        </a>
      </li>
      <li class="l3">
        <a href="javascript:;">
          <img :src="this.soon[0].imgSrc" alt="">
          <p>{{this.soon[0].complete}}</p>
          <p class="last"><span>{{this.soon.length}}</span>本</p>
        </a>
      </li>
    </ul>
    <div class="footer">
      <p><span>9</span>本公开阅读</p>
      <div class="chakan"><a href="javascript:;">查看我的公开页面</a></div>
    </div>
  </div>
</template>

<script>
export default {
  name: "Progress",
  data() {
    return {
      notYet:[], // *尚未
      ls:[], //* 正在
      soon:[], // *即将
      count:[] // * 计书器
    };
  },
  props:['mess'],
  created() {
    this.fn_setDataList()
  },

  methods: {
    fn_setDataList(){
      this.mess.forEach(item => {
      if(item.status == 0) this.notYet.push(item);
      if(item.status == 1) this.ls.push(item);
      if(item.status == 2) this.soon.push(item)
      })
    }
  },
};
</script>

<style lang="less" scoped>
.progress {
  width: 100%;
  box-sizing: border-box;
  .book-progress {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    li {
      width: 32%;
      // border:1px solid #ccc;
      height: 2.8rem;
      margin: 0.2rem 0 0.3rem 0;
      a {
        text-align: left;
        // display: block;
        img {
          width: 100%;
          height: 90%;
          display: block;
        }
        p {
          margin: 0;
          padding: 0;
          color: #000;
          text-align: center;
        }
        .last{
          color:#666;
        }
      }
    }
    .l1{
      // position: absolute;
      
    }
  }
  .footer {
    margin-top: 0.5rem;
    text-align: center;
    p {
      font-size: 0.12rem;
      color: #999;
      margin: 0;
      padding: 0;
    }
    .chakan {
      width: 100%;
      font-size: 0.13rem;
      margin-top: 0.1rem;
    }
  }
}
</style>